﻿<%@ Page Language="C#" MasterPageFile="~/Provider/MasterPage.master" AutoEventWireup="true" CodeFile="View.aspx.cs" Inherits="Provider_View" Title="无标题页" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
        var template = '<span style="color:{0};">{1}</span>';

        var Shenhe = function (value) {
            if(value==0){return String.format(template,'red', '未审');}
            if(value==1){return String.format(template,'green', '同意');}
            if(value==2){return String.format(template,'blue', '退回');}
        }
    </script>
    <ext:Store ID="Store1" OnRefreshData="Store1_OnRefreshData" runat="server">
    <Reader>
        <ext:JsonReader ReaderID="pid">
            <Fields>
                <ext:RecordField Name="pid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="providername" Type="String"></ext:RecordField>
                <ext:RecordField Name="devicename" Type="String"></ext:RecordField>
                <ext:RecordField Name="Dept_master_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="Tech_master_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="Office_master_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="Boss_status" Type="Int"></ext:RecordField>
                <ext:RecordField Name="deptname" Type="String"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    <AutoLoadParams>
         <ext:Parameter Name="start" Mode="Raw" Value="0" />
         <ext:Parameter Name="limit" Mode="raw" Value="10" />
     </AutoLoadParams> 
    </ext:Store>
    <ext:Store ID="Store2" runat="server">
    <Reader>
        <ext:JsonReader>
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    </ext:Store>
    <ext:Store ID="Store3" runat="server">
    <Reader>
        <ext:JsonReader>
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    </ext:Store>
    <ext:Store ID="Store4" runat="server">
    <Reader>
        <ext:JsonReader>
            <Fields>
                <ext:RecordField Name="uid" Type="Int"></ext:RecordField>
                <ext:RecordField Name="username" Type="String"></ext:RecordField>
            </Fields>
        </ext:JsonReader>
    </Reader>
    </ext:Store>
    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
            <ext:ColumnLayout ID="ColumlayOut1" Split="true" FitHeight="true" runat="server">
                <Columns>
                    <ext:LayoutColumn ColumnWidth="0.4">
                    <ext:Panel ID="Panel4" AutoHeight="true" runat="server" Title="处理列表">
                        <Body>
                            <ext:GridPanel ID="GridPanel1" StoreID="Store1"  Height="500" runat="server">
                                <ColumnModel>
                                    <Columns> 
                                        <ext:Column ColumnID="pid" DataIndex="pid" Header="编号"></ext:Column>
                                        <ext:Column ColumnID="providername" DataIndex="providername" Header="供应商"></ext:Column>
                                        <ext:Column ColumnID="devicename" DataIndex="devicename" Header="设备名称"></ext:Column>
                                        <ext:Column ColumnID="username" DataIndex="username" Header="提交人"></ext:Column>
                                        <ext:Column ColumnID="deptname" DataIndex="deptname" Header="提交部门"></ext:Column>
                                        <ext:Column ColumnID="Dept_master_status" DataIndex="Dept_master_status" Header="部门领导">
                                        <Renderer Fn="Shenhe" />
                                        </ext:Column>
                                        <ext:Column ColumnID="Tech_master_status" DataIndex="Tech_master_status" Header="生产技术部领导">
                                        <Renderer Fn="Shenhe" />
                                        </ext:Column>
                                        <ext:Column ColumnID="Office_master_status" DataIndex="Office_master_status" Header="办公室领导">
                                        <Renderer Fn="Shenhe" />
                                        </ext:Column>
                                        <ext:Column ColumnID="Boss_status" DataIndex="Boss_status" Header="公司领导">
                                        <Renderer Fn="Shenhe" />
                                        </ext:Column>
                                    </Columns>
                                </ColumnModel>
                                <SelectionModel>
                                     <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                                                <AjaxEvents>
                                                    <RowSelect OnEvent="RowSelect" Buffer="250">
                                                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{FormPanel1}" />
                                                        <ExtraParams>
                                                            <%-- or can use params[2].id as value --%>
                                                            <ext:Parameter Name="pid" Value="this.getSelected().id" Mode="Raw" />
                                                        </ExtraParams>
                                                    </RowSelect>
                                                </AjaxEvents>
                                            </ext:RowSelectionModel>
                                </SelectionModel>
                                <BottomBar>
                                    <ext:PagingToolBar 
                                        ID="PagingToolBar1" 
                                        runat="server" 
                                        PageSize="10" 
                                        StoreID="Store1" 
                                        />
                                </BottomBar>
                            </ext:GridPanel>
                        </Body>
                    </ext:Panel>
                </ext:LayoutColumn>
                    <ext:LayoutColumn ColumnWidth="0.6">
                    <ext:FormPanel  AutoScroll="true"  ID="FormPanel1" runat="server"  BodyStyle="padding:5px;" Frame="true"  Title="处理详细" Width="300">
                        <Body>
                  <ext:ContainerLayout  ID="ContainerLayout1"  runat="server">
                    <ext:Panel ID="Panel1" runat="server" Title="供应商" Collapsed=true FormGroup="true">
                        <Body>
                        <ext:Hidden ID="pid" runat="server"></ext:Hidden>
                        <ext:Hidden ID="guid" runat="server"></ext:Hidden>
                        <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >供应商名称:</td>
                                <td style="text-align:left;"><ext:Label ID="tfprovidername" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >设备名称:</td>
                                <td style="text-align:left;"><ext:Label ID="tfdevicename" runat="server"></ext:Label> </td>
                            </tr>
                        </table>                                        
                        </Body>
                    </ext:Panel>
                    
                    <ext:Panel ID="Panel2" runat="server" Title="提供虚假材料" Collapsed=true FormGroup="true" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                <td style="text-align:left;"><ext:Label ID="tfsham_time" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >项目名称:</td>
                                <td style="text-align:left;"><ext:Label ID="tfsham_project" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >详细:</td>
                                <td style="text-align:left;"><ext:Label ID="tfsham_detail" runat="server"></ext:Label> </td>
                            </tr>
                        </table>    
                        </Body>
                    </ext:Panel>
                    
                     <ext:Panel ID="Panel3" runat="server" Title="向公司有关工作人员提供钱物等" Collapsed=true FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                <td style="text-align:left;"><ext:Label ID="tfxinghui_time" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >项目名称:</td>
                                <td style="text-align:left;"><ext:Label ID="tfxinghui_project" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >详细:</td>
                                <td style="text-align:left;"><ext:Label ID="tfxinghui_detail" runat="server"></ext:Label> </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel5" runat="server" Title="履行合同中出现的不良行为（如设备质量、售后服务等）" Collapsed=true FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >时间:</td>
                                <td style="text-align:left;"><ext:Label ID="tfcontract_time" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >项目名称:</td>
                                <td style="text-align:left;"><ext:Label ID="tfcontract_project" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >详细:</td>
                                <td style="text-align:left;"><ext:Label ID="tfcontract_detail" runat="server"></ext:Label> </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel6" runat="server" Title="其他不良行为" Collapsed=true  FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >详细:</td>
                                <td style="text-align:left;"><ext:Label ID="tfother_detail" runat="server"></ext:Label> </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel11" runat="server" Title="附件" Collapsed=true  FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            <tr>
                                <td style="width:150px; vertical-align:top;text-align:right;" >详细:</td>
                                <td style="text-align:left;"> 
                                    <ext:HyperLink ID="tfFileShow" runat="server" >
                                    </ext:HyperLink>
                                </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel7" runat="server" Collapsed=true Title="部门领导意见" AutoHeight="true" FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >部门领导审核态度:</td>
                                <td style="text-align:left;">
                                <ext:ComboBox FieldLabel="审核状态" ID="tfdeptmaster_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items> 
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right; " ><!--时间:--></td>
                                <td style="text-align:left;"><ext:Label ID="tfdeptmaster_time" Visible="false" runat="server"></ext:Label> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >部门领导审核意见:</td>
                                <td style="text-align:left;"> <ext:TextArea Width="250"  runat="server" ID="tfdeptmaster_remark"></ext:TextArea> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right; " >生产技术部:</td>
                                <td style="text-align:left;">
                                    <ext:ComboBox StoreID="Store2" ID="tftechmaster_id" DisplayField="username" ValueField="uid" EmptyText="未选择" runat="server">
                                    </ext:ComboBox> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right; " >办公室:</td>
                                <td style="text-align:left;">
                                    <ext:ComboBox StoreID="Store3" ID="tfofficemaster_id" DisplayField="username" ValueField="uid" EmptyText="未选择" runat="server">
                                    </ext:ComboBox> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right; " >公司领导:</td>
                                <td style="text-align:left;">
                                    <ext:ComboBox StoreID="Store4" ID="tfboss_id" DisplayField="username" ValueField="uid" EmptyText="未选择" runat="server">
                                    </ext:ComboBox> </td>
                            </tr>
                             <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" ></td>
                                <td style="text-align:left;">
                                    <ext:Button ID="Btndeptmaster" runat="server" Icon="Disk" Text="提交">
                                        <AjaxEvents>
                                            <Click OnEvent="Btndeptmaster_click"></Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel8" runat="server" Collapsed=true Title="设备工程主管部门（生产技术部）负责人的审核意见" AutoHeight="true" FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核态度:</td>
                                <td style="text-align:left;">
                                <ext:ComboBox FieldLabel="审核状态"   ID="tftechmaster_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items> 
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> </td>
                            </tr> 
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核意见:</td>
                                <td style="text-align:left;"> <ext:TextArea Width="250" runat="server" ID="tftechmaster_remark"></ext:TextArea> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" ></td>
                                <td style="text-align:left;">
                                    <ext:Button ID="Btntechmaster" runat="server" Icon="Disk" Text="提交">
                                        <AjaxEvents>
                                            <Click OnEvent="Btntechmaster_click"></Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel9" runat="server" Collapsed=true Title="办公室负责人的审核意见" AutoHeight="true" FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核态度:</td>
                                <td style="text-align:left;">
                                <ext:ComboBox FieldLabel="审核状态"   ID="tfofficemaster_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items> 
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> </td>
                            </tr> 
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核意见:</td>
                                <td style="text-align:left;"> <ext:TextArea Width="250" runat="server" ID="tfofficemaster_remark"></ext:TextArea> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" ></td>
                                <td style="text-align:left;">
                                    <ext:Button ID="Btnofficemaster" runat="server" Icon="Disk" Text="提交">
                                        <AjaxEvents>
                                            <Click OnEvent="Btnofficemaster_click"></Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                    <ext:Panel ID="Panel10" Collapsed=true runat="server" Title="公司领导的审核意见" AutoHeight="true" FormGroup="true" BodyStyle="padding:5px;" >
                        <Body>
                            <table border="0" width="100%" cellpadding="10" cellspacing="10">
                            
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核态度:</td>
                                <td style="text-align:left;">
                                <ext:ComboBox FieldLabel="审核状态"   ID="tfboss_status" runat="server" EmptyText="请选择" Editable="false">
                                                <Items>
                                                    <ext:ListItem Text="未审核" Value="0" />
                                                    <ext:ListItem Text="同意" Value="1" />
                                                    <ext:ListItem Text="退回" Value="2" />
                                                </Items>
                                            </ext:ComboBox> </td>
                            </tr> 
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" >审核意见:</td>
                                <td style="text-align:left;"> <ext:TextArea Width="250" runat="server" ID="tfboss_remark"></ext:TextArea> </td>
                            </tr>
                            <tr>
                                <td style="width:200px; vertical-align:top;text-align:right;" ></td>
                                <td style="text-align:left;">
                                    <ext:Button ID="Btnboss"  runat="server" Icon="Disk" Text="提交">
                                        <AjaxEvents>
                                            <Click OnEvent="Btnboss_click"></Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </td>
                            </tr>
                        </table> 
                        </Body>
                    </ext:Panel>
                </ext:ContainerLayout>
                        </Body>
 
                    </ext:FormPanel>
                </ext:LayoutColumn>
                </Columns>
            </ext:ColumnLayout>
        </Body>
    </ext:ViewPort>
</asp:Content>

